package com.wiscamp.ninechapters.problems.domain.repositories;

import com.wiscamp.ninechapters.problems.domain.models.mistakes.Mistake;
import com.wiscamp.ninechapters.problems.domain.models.mistakes.MistakeQuantityBySetType;
import cube.ddd.common.query.PagedObjects;
import cube.ddd.common.query.PagedQuery;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;

import java.util.Collection;

public interface MistakeRepository {
    Mistake getMistake(@Min(0) long mistakeId);

    Mistake getMistake(long userId, long taskId, long setId, long problemId, long questionId);

    Mistake saveMistake(Mistake mistake);

    PagedObjects<Mistake> getMistakesByQuery(@NotNull PagedQuery query);

    int getMistakesQuantityByUser(@Min(0) long userId);

    boolean deleteMistake(long mistakeId);

    Collection<MistakeQuantityBySetType> getGroupedMistakesQuantityBySetType(long userId);

    Collection<Mistake> getMistakesBySetType(@Min(0) long userId, @Min(0) long setType);

    Collection<Mistake> getMistakesByUser(@Min(0) long userId);
}
